﻿#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>
#include<string.h>
#include<windows.h> //用于延时，Sleep
constexpr auto USER = "123456";
constexpr auto PASS_WORD = "888888";


void login();       //用户登录
void wlwcom();		//欢迎界面
void rome();		//房间基本信息
void huncai();		 //荤菜界面
void sucai();		//素菜界面
void liangcai();     //凉菜界面
void jiushui();		//酒水饮料界面
void service();		//请求服务的界面
void end();		//服务界面
void delay();	//延时函数

void login()
{
	while (1)
	{
		char name[20], pwd[20];
		printf("请输入您的账号：");
		scanf("%s", name);
		printf("请输入您的密码：");
		scanf("%s", pwd);

		if (strcmp(name, USER) == 0 && strcmp(pwd, PASS_WORD) == 0)
		{
			break;
		}
		else
		{
			printf("输入的用户名或密码错误，请重新输入!\n\n");
		}
	}
	system("cls");


}

int roomNumber, peopleNumber;
double totalPrice = 0;
void main()
{
    //system("color F5");

	login();

	wlwcom();

	rome();

	huncai();
	do
	{
		printf("请输入编号进行点餐并按Enter\n");
		int num;
		scanf_s("%d", &num);

		//清空输入缓冲区
		fflush(stdin);

		if (num == 1) {
			totalPrice = 30 + totalPrice;
		}
		if (num == 2) {
			totalPrice = 45 + totalPrice;
		}
		if (num == 3) {
			totalPrice = 30 + totalPrice;
		}
		if (num == 4) {
			totalPrice = 30 + totalPrice;
		}
		if (num == 5) {
			totalPrice = 25 + totalPrice;
		}
		if (num == 6) {
			totalPrice = 48 + totalPrice;
		}
		if (num == 7) {
			totalPrice = 45 + totalPrice;
		}
		if (num == 8) {
			totalPrice = 45 + totalPrice;
		}
		if (num == 9) {
			totalPrice = 32 + totalPrice;
		}
		if (num == 10) {
			totalPrice = 32 + totalPrice;
		}
		if (num == 11) {
			totalPrice = 30 + totalPrice;
		}
		if (num == 12) {
			totalPrice = 40 + totalPrice;
		}
		if (num == 13) {
			totalPrice = 33 + totalPrice;
		}
		if (num == 14) {
			totalPrice = 34 + totalPrice;
		}
		if (num == 15) {
			totalPrice = 35 + totalPrice;
		}
		if (num == 16) {
			totalPrice = 30 + totalPrice;
		}
		if (num == 17) {
			totalPrice = 24 + totalPrice;
		}
		if (num == 18) {
			totalPrice = 22 + totalPrice;
		}
		if (num == 19) {
			totalPrice = 24 + totalPrice;
		}
		if (num == 20) {
			totalPrice = 25 + totalPrice;
		}
		if (num == 21) {
			totalPrice = 35 + totalPrice;
		}

		printf("您现在已消费%.2f元\n", totalPrice);
		printf("如果继续点荤菜，请输入除0外的任意数字后按Enter，如果想点素菜，则输入0后按Enter\n");
		scanf_s("%d", &num);
		if (num == 0)
			break;
		else
			huncai();
	} while (1);

	delay();
	//system("cls");
	printf("您现在已消费%.2f元\n", totalPrice);

	sucai();
	do
	{
		printf("请输入编号进行点餐并按Enter\n");
		int num;
		scanf_s("%d", &num);
		fflush(stdin);

		if (num == 1) {
			totalPrice = 15 + totalPrice;
		}
		if (num == 2) {
			totalPrice = 15 + totalPrice;
		}
		if (num == 3) {
			totalPrice = 10 + totalPrice;
		}
		if (num == 4) {
			totalPrice = 12 + totalPrice;
		}
		if (num == 5) {
			totalPrice = 13 + totalPrice;
		}
		if (num == 6) {
			totalPrice = 8 + totalPrice;
		}
		if (num == 7) {
			totalPrice = 8 + totalPrice;
		}
		if (num == 8) {
			totalPrice = 10 + totalPrice;
		}
		if (num == 9) {
			totalPrice = 10 + totalPrice;
		}
		if (num == 10) {
			totalPrice = 10 + totalPrice;
		} 
		if (num == 11) {
			totalPrice = 8 + totalPrice;
		}
		if (num == 12) {
			totalPrice = 9 + totalPrice;
		}
		if (num == 13) {
			totalPrice = 10 + totalPrice;
		}
		if (num == 14) {
			totalPrice = 11 + totalPrice;
		}
		if (num == 15) {
			totalPrice = 12 + totalPrice;
		}
        printf("您现在已消费%.2f元\n", totalPrice);
		printf("如果继续点素菜，请输入除0外的任意数字后按Enter，如果想点凉菜，则请输入0后按Enter\n");
		scanf_s("%d", &num);
		if (num == 0)
			break;
		else
			sucai();
	} while (1);

	delay();
	//system("cls");

	printf("您现在已消费%.2f元\n", totalPrice);

	liangcai();

	do
	{
		printf("请输入编号进行点餐并按Enter\n");
		int num;
		scanf_s("%d", &num);
		fflush(stdin);

		if (num == 1) {
			totalPrice = 18 + totalPrice;
		}
		if (num == 2) {
			totalPrice = 16 + totalPrice;
		}
		if (num == 3) {
			totalPrice = 18 + totalPrice;
		}
		if (num == 4) {
			totalPrice = 24 + totalPrice;
		}
		if (num == 5) {
			totalPrice = 24 + totalPrice;
		}
		if (num == 6) {
			totalPrice = 16 + totalPrice;
		}
		if (num == 7) {
			totalPrice = 15 + totalPrice;
		}
		if (num == 8) {
			totalPrice = 14 + totalPrice;
		}
		if (num == 9) {
			totalPrice = 13 + totalPrice;
		}
		if (num == 10) {
			totalPrice = 12 + totalPrice;
		}
		if (num == 11) {
			totalPrice = 18 + totalPrice;
		}
		if (num == 12) {
			totalPrice = 18 + totalPrice;
		}
		if (num == 13) {
			totalPrice = 15 + totalPrice;
		}
		if (num == 14) {
			totalPrice = 12 + totalPrice;
		}
		if (num == 15) {
			totalPrice = 12 + totalPrice;
		}
		printf("您现在已消费%.2f元\n", totalPrice);
		printf("如果继续点凉菜，请输入除0外的任意数字后按Enter，如果想点酒水，则请输入0后按Enter\n");
		scanf_s("%d", &num);
		if (num == 0)
			break;
		else
			liangcai();
	} while (1);
	delay();
	//system("cls");
	printf("您现在消费总金额为%.2f\n", totalPrice);

	jiushui();
	do
	{
		printf("请输入编号进行点餐并按Enter\n");
		int num;
		scanf_s("%d", &num);
		fflush(stdin);

		if (num == 1) {
			totalPrice = 4 + totalPrice;
		}
		if (num == 2) {
			totalPrice = 4 + totalPrice;
		}
		if (num == 3) {
			totalPrice = 12 + totalPrice;
		}
		if (num == 4) {
			totalPrice = 12 + totalPrice;
		}
		if (num == 5) {
			totalPrice = 10 + totalPrice;
		}
		if (num == 6) {
			totalPrice = 8 + totalPrice;
		}
		if (num == 7) {
			totalPrice = 5 + totalPrice;
		}
		if (num == 8) {
			totalPrice = 28 + totalPrice;
		}
		if (num == 9) {
			totalPrice = 15 + totalPrice;
		}
		if (num == 10) {
			totalPrice = 10 + totalPrice;
		}
		if (num == 11) {
			totalPrice = 10 + totalPrice;
		}
		if (num == 12) {
			totalPrice = 5 + totalPrice;
		}
		if (num == 13) {
			totalPrice = 5 + totalPrice;
		}
		if (num == 14) {
			totalPrice = 5 + totalPrice;
		}
		if (num == 15) {
			totalPrice = 3 + totalPrice;
		}
		if (num == 16) {
			totalPrice = 6 + totalPrice;
		}
		if (num == 17) {
			totalPrice = 8 + totalPrice;
		}
		if (num == 18) {
			totalPrice = 58 + totalPrice;
		}
		if (num == 19) {
			totalPrice = 20 + totalPrice;
		}
		if (num == 20) {
			totalPrice = 30 + totalPrice;
		}
		if (num == 21) {
			totalPrice = 16 + totalPrice;
		}
		if (num == 22) {
			totalPrice = 30 + totalPrice;
		}
		if (num == 23) {
			totalPrice = 16 + totalPrice;
		}
		if (num == 24) {
			totalPrice = 10 + totalPrice;
		}
		if (num == 25) {
			totalPrice = 20 + totalPrice;
		}
		if (num == 26) {
			totalPrice = 12 + totalPrice;
		}
		if (num == 27) {
			totalPrice = 50 + totalPrice;
		}
		if (num == 28) {
			totalPrice = 50 + totalPrice;
		}
		if (num == 29) {
			totalPrice = 12 + totalPrice;
		}
		if (num == 30) {
			totalPrice = 20 + totalPrice;
		}
		if (num == 31) {
			totalPrice = 80 + totalPrice;
		}
		if (num == 32) {
			totalPrice = 32 + totalPrice;
		}
		if (num == 33) {
			totalPrice = 3 + totalPrice;
		}
		if (num == 34) {
			totalPrice = 20 + totalPrice;
		}
		if (num == 35) {
			totalPrice = 28 + totalPrice;
		}
		if (num == 36) {
			totalPrice = 58 + totalPrice;
		}
		if (num == 37) {
			totalPrice = 10 + totalPrice;
		}
		if (num == 38) {
			totalPrice = 15 + totalPrice;
		}
		if (num == 39) {
			totalPrice = 12 + totalPrice;
		}
		if (num == 40) {
			totalPrice = 8 + totalPrice;
		}



		printf("您现在已消费%.2f元\n", totalPrice);
		printf("如果继续点酒水，请输入除0外的任意数字后按Enter，退出点餐请输入0后按Enter\n");
		scanf_s("%d", &num);
		if (num == 0)
			break;
		else
			jiushui();
	} while (1);

	delay();

	//system("cls");

	printf("您现在消费总金额为%.2f\n", totalPrice);
	printf("请问您是否为本店VIP？如果是请按1，如果不是请按2\n");

	int scanfVip;
	scanf_s("%d", &scanfVip);
	if (scanfVip == 1)
	{
		for (;;)
		{
			printf("请输入您的会员卡号(10位):\n");
			int vipNumber;
			scanf_s("%d", &vipNumber);

			if ((vipNumber > 999999999) && (vipNumber <= 99999999999))  //数字为10位
			{
				//会员密码默认等于会员卡号
				printf("请输入密码\n");
				int vipPassword;
				scanf_s("%d", &vipPassword);
				if (vipNumber == vipPassword)
				{
					//打八折
					totalPrice = totalPrice * 0.8;
					break;
				}
				else
				{
					int passwordError = 0;
					for (passwordError; passwordError <= 10; passwordError++)
					{
						printf("会员卡号密码错误，请重新输入！");
						if (passwordError = 3)
						{
							break;
						}
					}
				}
			}
			else {
				printf("会员卡密码错误！请重新输入会员卡号\n");
			}
		}
	}
	if (scanfVip == 2) {
		totalPrice = totalPrice;
	}

	delay();

	printf("************订单确认************\n您的房间号是%d，人数是%d，\n您消费的总金额是%.2f\n", roomNumber, peopleNumber, totalPrice);
	printf("祝您用餐愉快！！！\n");

	service();

	end();
}

void wlwcom()
{
	printf("**************************************\n");
	printf("         欢迎光临豪华大餐厅           \n");
	printf("             祝您用餐愉快             \n");
	printf("             很高兴为您服务           \n");
	printf("               请您点餐               \n");
	printf("**************************************\n");
}

void rome()
{
	printf("请输入您的房间号：");
	scanf_s("%d", &roomNumber);
	printf("请输入您的就餐人数：");
	scanf_s("%d", &peopleNumber);
}

void huncai()
{
	printf("\n请选择您的荤菜...\n");
	printf("1.鱼香肉丝---------------------30元\n");
	printf("2.毛血旺-----------------------45元\n");
	printf("3.山椒鸡丁---------------------30元\n");
	printf("4.干煸兔丁---------------------30元\n");
	printf("5.盐煎肉-----------------------25元\n");
	printf("6.香辣烤罗非鱼-----------------48元\n");
	printf("7.五香烤傣鲤-------------------45元\n");
	printf("8.香茅草捆鱼-------------------45元\n");
	printf("9.菠萝爆肉片-------------------32元\n");
	printf("10.汽锅鸡----------------------32元\n");
	printf("11.竹筒鸡----------------------30元\n");
	printf("12.回锅肉----------------------40元\n");
	printf("13.火爆猪肝--------------------33元\n");
	printf("14.红烧鱼块--------------------34元\n");
	printf("15.麻辣牛肉--------------------35元\n");
	printf("16.酸辣腰花--------------------30元\n");
	printf("17.麻辣猪肝--------------------24元\n");
	printf("18.芹菜瘦肉--------------------22元\n");
	printf("19.豆食炒腊肉------------------24元\n");
	printf("20.蒜台炒肉丝------------------25元\n");
	printf("21.榨广椒炒腊肉----------------35元\n");
}

void sucai()
{
	printf("\n请选择您的素菜...\n");
	printf("1.山椒土豆丝------------------15元\n");
	printf("2.干煸四季豆------------------15元\n");
	printf("3.西红柿炒鸡蛋----------------10元\n");
	printf("4.醋溜土豆丝------------------12元\n");
	printf("5.虎皮青椒--------------------13元\n");
	printf("6.炒青菜-----------------------8元\n");
	printf("7.金钩冬瓜---------------------8元\n");
	printf("8.麻辣豆腐--------------------10元\n");
	printf("9.干煎豆腐--------------------10元\n");
	printf("10.酸辣空心菜------------------8元\n");
	printf("11.五彩黄瓜卷------------------9元\n");
	printf("12.山椒豆角-------------------10元\n");
	printf("13.蜜汁小南瓜-----------------11元\n");
	printf("14.四季豆炒冬瓜---------------12元\n");
	printf("15.湘间小炒-------------------13元\n");
}

void liangcai()
{
	printf("\n请选择您的凉菜...\n");
	printf("1.巧拌萝卜丝------------------18元\n");
	printf("2.麻辣香干--------------------16元\n");
	printf("3.洋葱木耳--------------------18元\n");
	printf("4.葱油香干--------------------24元\n");
	printf("5.凉拌土豆丝------------------24元\n");
	printf("6.凉拌菠菜--------------------16元\n");
	printf("7.西柠素鸭--------------------15元\n");
	printf("8.翡翠甜心--------------------14元\n");
	printf("9.拍黄瓜----------------------13元\n");
	printf("10.白玉金钱-------------------12元\n");
	printf("11.红油肚丝-------------------18元\n");
	printf("12.圆葱拌猪耳-----------------18元\n");
	printf("13.清白金针菇-----------------15元\n");
	printf("14.瓜丝金针菇-----------------12元\n");
	printf("15.姜汁皮蛋-------------------12元\n");
}

void jiushui()
{
	printf("\n请选择您的酒水饮料...\n");
	printf("1.雪碧-------------------------4元\n");
	printf("2.可乐-------------------------4元\n");
	printf("3.勇闯天涯--------------------12元\n");
	printf("4.青岛啤酒--------------------12元\n");
	printf("6.健力宝-----------------------8元\n");
	printf("7.小黄梨汁---------------------5元\n");
	printf("8.蓝莓果饮--------------------15元\n");
	printf("9.沙棘汁----------------------10元\n");
	printf("10.生榨雪梨-------------------10元\n");
	printf("11.小健力宝--------------------5元\n");
	printf("12.王老吉----------------------5元\n");
	printf("13.露露------------------------5元\n");
	printf("14.小醒目----------------------3元\n");
	printf("15.大醒目----------------------6元\n");
	printf("16.大可乐----------------------6元\n");
	printf("17.果粒橙----------------------8元\n");
	printf("18.大竹叶青-------------------58元\n");
	printf("19.小竹叶青-------------------20元\n");
	printf("20.大杏花春-------------------30元\n");
	printf("21.小杏花春-------------------16元\n");
	printf("22.大北特加-------------------30元\n");
	printf("23.小北特加-------------------16元\n");
	printf("24.小小杏花春-----------------10元\n");
	printf("25.升级汾阳王-----------------20元\n");
	printf("26.小汾阳王-------------------12元\n");
	printf("27.出口汾---------------------50元\n");
	printf("28.黄盖汾---------------------50元\n");
	printf("29.小劲酒---------------------12元\n");
	printf("30.小汾酒---------------------20元\n");
	printf("31.小糊涂仙-------------------80元\n");
	printf("32.大水晶汾阳王---------------32元\n");
	printf("33.牛栏山二锅头----------------3元\n");
	printf("34.大汾阳王-------------------20元\n");
	printf("35.半斤竹叶青-----------------28元\n");
	printf("36.小小水晶汾阳王-------------10元\n");
	printf("37.雪花纯生-------------------10元\n");
	printf("38.雪花晶尊-------------------12元\n");
	printf("39.雪花无醇-------------------15元\n");
	printf("40.雪花精品--------------------8元\n");
}

void service()
{
	printf("\n请选择您需要的操作\n");
	printf("1.呼叫服务员以请求服务。\n");
	printf("2.添菜或添酒。\n");
	printf("3.结账。\n");
}

void end()
{
	int scanfNum;
	scanf_s("%d", &scanfNum);
	{
		if (scanfNum == 1)
		{
			printf("亲，呼叫成功，服务员马上就到!\n");
			service();
			end();
		}
		if (scanfNum == 2)
		{
			huncai();
			do
			{
				printf("请输入编号进行点餐并按Enter\n");
				int num;
				scanf_s("%d", &num);

				//清空输入缓冲区
				fflush(stdin);

				if (num == 1) {
					totalPrice = 30 + totalPrice;
				}
				if (num == 2) {
					totalPrice = 45 + totalPrice;
				}
				if (num == 3) {
					totalPrice = 30 + totalPrice;
				}
				if (num == 4) {
					totalPrice = 30 + totalPrice;
				}
				if (num == 5) {
					totalPrice = 25 + totalPrice;
				}
				if (num == 6) {
					totalPrice = 48 + totalPrice;
				}
				if (num == 7) {
					totalPrice = 45 + totalPrice;
				}
				if (num == 8) {
					totalPrice = 45 + totalPrice;
				}
				if (num == 9) {
					totalPrice = 32 + totalPrice;
				}
				if (num == 10) {
					totalPrice = 32 + totalPrice;
				}
				if (num == 11) {
					totalPrice = 30 + totalPrice;
				}
				if (num == 12) {
					totalPrice = 40 + totalPrice;
				}
				if (num == 13) {
					totalPrice = 33 + totalPrice;
				}
				if (num == 14) {
					totalPrice = 34 + totalPrice;
				}
				if (num == 15) {
					totalPrice = 35 + totalPrice;
				}
				if (num == 16) {
					totalPrice = 30 + totalPrice;
				}
				if (num == 17) {
					totalPrice = 24 + totalPrice;
				}
				if (num == 18) {
					totalPrice = 22 + totalPrice;
				}
				if (num == 19) {
					totalPrice = 24 + totalPrice;
				}
				if (num == 20) {
					totalPrice = 25 + totalPrice;
				}
				if (num == 21) {
					totalPrice = 35 + totalPrice;
				}


				printf("您现在已消费%.2f元\n", totalPrice);
				printf("如果继续点荤菜，请输入除0外的任意数字后按Enter，如果想点素菜，则输入0后按Enter\n");
				scanf_s("%d", &num);
				if (num == 0)
					break;
				else
					huncai();
			} while (1);

			delay();
			//system("cls");

			sucai();
			do
			{
				printf("请输入编号进行点餐并按Enter\n");
				int num;
				scanf_s("%d", &num);
				fflush(stdin);

				if (num == 1) {
					totalPrice = 15 + totalPrice;
				}
				if (num == 2) {
					totalPrice = 15 + totalPrice;
				}
				if (num == 3) {
					totalPrice = 10 + totalPrice;
				}
				if (num == 4) {
					totalPrice = 12 + totalPrice;
				}
				if (num == 5) {
					totalPrice = 13 + totalPrice;
				}
				if (num == 6) {
			        totalPrice = 8 + totalPrice;
		        }
		        if (num == 7) {
			        totalPrice = 8 + totalPrice;
		        }
		        if (num == 8) {
			        totalPrice = 10 + totalPrice;
		        }
		        if (num == 9) {
			        totalPrice = 10 + totalPrice;
		        }
		        if (num == 10) {
			        totalPrice = 10 + totalPrice;
		        }
				if (num == 11) {
					totalPrice = 8 + totalPrice;
				}
				if (num == 12) {
					totalPrice = 9 + totalPrice;
				}
				if (num == 13) {
					totalPrice = 10 + totalPrice;
				}
				if (num == 14) {
					totalPrice = 11 + totalPrice;
				}
				if (num == 15) {
					totalPrice = 12 + totalPrice;
				}


				printf("您现在已消费%.2f元\n", totalPrice);
				printf("如果继续点素菜，请输入除0外的任意数字后按Enter，如果想点凉菜，则请输入0后按Enter\n");
				scanf_s("%d", &num);
				if (num == 0)
					break;
				else
					sucai();
			} while (1);

			delay();
			//system("cls");

			printf("您现在已消费%.2f元\n", totalPrice);
			liangcai();

			do
			{
				printf("请输入编号进行点餐并按Enter\n");
				int num;
				scanf_s("%d", &num);
				fflush(stdin);
				if (num == 1) {
					totalPrice = 18 + totalPrice;
				}
				if (num == 2) {
					totalPrice = 16 + totalPrice;
				}
				if (num == 3) {
					totalPrice = 18 + totalPrice;
				}
				if (num == 4) {
					totalPrice = 24 + totalPrice;
				}
				if (num == 5) {
					totalPrice = 24 + totalPrice;
				}
				if (num == 6) {
					totalPrice = 16 + totalPrice;
				}
				if (num == 7) {
					totalPrice = 15 + totalPrice;
				}
				if (num == 8) {
					totalPrice = 14 + totalPrice;
				}
				if (num == 9) {
					totalPrice = 13 + totalPrice;
				}
				if (num == 10) {
					totalPrice = 12 + totalPrice;
				}
				if (num == 11) {
					totalPrice = 18 + totalPrice;
				}
				if (num == 12) {
					totalPrice = 18 + totalPrice;
				}
				if (num == 13) {
					totalPrice = 15 + totalPrice;
				}
				if (num == 14) {
					totalPrice = 12 + totalPrice;
				}
				if (num == 15) {
					totalPrice = 12 + totalPrice;
				}

				printf("您现在已消费%.2f元\n", totalPrice);
				printf("如果继续点凉菜，请输入除0外的任意数字后按Enter，如果想点酒水，则请输入0后按Enter\n");
				scanf_s("%d", &num);
				if (num == 0)
					break;
				else
					liangcai();
			} while (1);

			jiushui();

			do
			{
				printf("请输入编号进行点餐并按Enter\n");
				int num;
				scanf_s("%d", &num);
				fflush(stdin);

				if (num == 1) {
					totalPrice = 4 + totalPrice;
				}
				if (num == 2) {
					totalPrice = 4 + totalPrice;
				}
				if (num == 3) {
					totalPrice = 12 + totalPrice;
				}
				if (num == 4) {
					totalPrice = 12 + totalPrice;
				}
				if (num == 5) {
					totalPrice = 10 + totalPrice;
				}
				if (num == 6) {
					totalPrice = 8 + totalPrice;
				}
				if (num == 7) {
					totalPrice = 5 + totalPrice;
				}
				if (num == 8) {
					totalPrice = 28 + totalPrice;
				}
				if (num == 9) {
					totalPrice = 15 + totalPrice;
				}
				if (num == 10) {
					totalPrice = 10 + totalPrice;
				}
				if (num == 11) {
					totalPrice = 10 + totalPrice;
				}
				if (num == 12) {
					totalPrice = 5 + totalPrice;
				}
				if (num == 13) {
					totalPrice = 5 + totalPrice;
				}
				if (num == 14) {
					totalPrice = 5 + totalPrice;
				}
				if (num == 15) {
					totalPrice = 3 + totalPrice;
				}
				if (num == 16) {
					totalPrice = 6 + totalPrice;
				}
				if (num == 17) {
					totalPrice = 8 + totalPrice;
				}
				if (num == 18) {
					totalPrice = 58 + totalPrice;
				}
				if (num == 19) {
					totalPrice = 20 + totalPrice;
				}
				if (num == 20) {
					totalPrice = 30 + totalPrice;
				}
				if (num == 21) {
					totalPrice = 16 + totalPrice;
				}
				if (num == 22) {
					totalPrice = 30 + totalPrice;
				}
				if (num == 23) {
					totalPrice = 16 + totalPrice;
				}
				if (num == 24) {
					totalPrice = 10 + totalPrice;
				}
				if (num == 25) {
					totalPrice = 20 + totalPrice;
				}
				if (num == 26) {
					totalPrice = 12 + totalPrice;
				}
				if (num == 27) {
					totalPrice = 50 + totalPrice;
				}
				if (num == 28) {
					totalPrice = 50 + totalPrice;
				}
				if (num == 29) {
					totalPrice = 12 + totalPrice;
				}
				if (num == 30) {
					totalPrice = 20 + totalPrice;
				}
				if (num == 31) {
					totalPrice = 80 + totalPrice;
				}
				if (num == 32) {
					totalPrice = 32 + totalPrice;
				}
				if (num == 33) {
					totalPrice = 3 + totalPrice;
				}
				if (num == 34) {
					totalPrice = 20 + totalPrice;
				}
				if (num == 35) {
					totalPrice = 28 + totalPrice;
				}
				if (num == 36) {
					totalPrice = 58 + totalPrice;
				}
				if (num == 37) {
					totalPrice = 10 + totalPrice;
				}
				if (num == 38) {
					totalPrice = 15 + totalPrice;
				}
				if (num == 39) {
					totalPrice = 12 + totalPrice;
				}
				if (num == 40) {
					totalPrice = 8 + totalPrice;
				}
				printf("您现在已消费%.2f元\n", totalPrice);
				printf("如果继续点酒水，请输入除0外的任意数字后按Enter，退出点餐请输入0后按Enter\n");
				scanf_s("%d", &num);
				if (num == 0)
					break;
				else
					jiushui();
			} while (1);

			//system("cls");

			printf("您现在消费总金额为%.2f", totalPrice);

			delay();
			service();

			end();
		}
		if (scanfNum == 3) {
			printf("亲！您消费的总金额为%.2f元。请准备好现金或卡\n", totalPrice);
		}
		printf("老板马上就到！感谢您在本餐厅消费。希望下次光临！\n");
	}
}

void delay()
{
	printf("请稍等，正在处理中，");
	for (int i = 3; i > 0; i--)
	{
		printf("%d.", i);
		Sleep(500);
		printf(".");
		Sleep(500);
		printf(".");
		Sleep(500);
	}
	printf("\n\n");
}


